home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / dev / c / minigl.lha / MiniGL / include / mgl / matrix.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-27  |  1.6 KB  |  72 lines

  1. /*
  2.  * $Id: matrix.h,v 1.1.1.1 2000/04/07 19:44:51 tfrieden Exp $
  3.  *
  4.  * $Date: 2000/04/07 19:44:51 $
  5.  * $Revision: 1.1.1.1 $
  6.  *
  7.  * (C) 1999 by Hyperion
  8.  * All rights reserved
  9.  *
  10.  * This file is part of the MiniGL library project
  11.  * See the file Licence.txt for more details
  12.  *
  13.  */
  14.  
  15. #ifndef _MATRIX_H
  16. #define _MATRIX_H
  17.  
  18. typedef struct Matrix_t
  19. {
  20.     float v[16];
  21.     int flags;                  // Matrix flags
  22.     struct Matrix_t *Inverse;   // optional inverse
  23.     int _pad_[2]; //16 byte align
  24. } Matrix;
  25.  
  26. #define OF_11 0
  27. #define OF_12 4
  28. #define OF_13 8
  29. #define OF_14 12
  30.  
  31. #define OF_21 1
  32. #define OF_22 5
  33. #define OF_23 9
  34. #define OF_24 13
  35.  
  36. #define OF_31 2
  37. #define OF_32 6
  38. #define OF_33 10
  39. #define OF_34 14
  40.  
  41. #define OF_41 3
  42. #define OF_42 7
  43. #define OF_43 11
  44. #define OF_44 15
  45.  
  46. #define  MGLMAT_IDENTITY        0x01
  47. #define  MGLMAT_ROTATION        0x02
  48. #define  MGLMAT_TRANSLATION        0x04
  49. #define  MGLMAT_UNIFORM_SCALE        0x08
  50. #define  MGLMAT_GENERAL_SCALE        0x10
  51. #define  MGLMAT_PERSPECTIVE        0x20
  52. #define  MGLMAT_GENERAL        0x40
  53. #define  MGLMAT_GENERAL_3D        0x80
  54. #define  MGLMAT_ORTHO            0x100
  55. #define  MGLMAT_0001            0x200
  56. //surgeon: for 0001*persp - common in spherical mapping
  57. #define  MGLMAT_00NEG10        0x400
  58. //common special case rotations
  59. #define  MGLMAT_ROT001        0x800
  60. #define  MGLMAT_ROT010        0x1000
  61. #define  MGLMAT_ROT100        0x2000
  62. //surgeon: unknown layout
  63. #define  MGLMAT_UNKNOWN        0x4000
  64.  
  65. #define MGLMASK_0001 (MGLMAT_IDENTITY|MGLMAT_ROTATION|MGLMAT_TRANSLATION|MGLMAT_UNIFORM_SCALE|MGLMAT_GENERAL_SCALE|MGLMAT_ORTHO|MGLMAT_0001|MGLMAT_ROT001|MGLMAT_ROT010|MGLMAT_ROT100)
  66. //ortho and special case rotations added by surgeon
  67.  
  68. //surgeon: mask for !MLMASK_0001
  69. #define MGLMASK_NONE    (MGLMAT_PERSPECTIVE|MGLMAT_UNKNOWN)
  70.  
  71. #endif
  72.